﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ContactViewModel.cs" company="ecblog.codeplex.com">
//   emrecoskun.net - ibrahimatay.com
// </copyright>
// <summary>
//   The contact view model
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace EcBlog.Models
{
    using System.ComponentModel.DataAnnotations;

    using EcBlog.Properties;

    /// <summary>
    /// The contact view model
    /// </summary>
    public class ContactViewModel
    {
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        [Required(ErrorMessageResourceType = typeof(ModelLocalization), ErrorMessageResourceName = "ContactViewModel_Name_You_need_to_fill_in_a_name")]
        [Display(ResourceType = typeof(ModelLocalization), Name = "ContactViewModel_Name")]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the email.
        /// </summary>
        /// <value>
        /// The email.
        /// </value>
        [Required(ErrorMessageResourceType = typeof(ModelLocalization),
            ErrorMessageResourceName = "ContactViewModel_Email_You_need_to_fill_in_an_email_address")]
        [DataType(DataType.EmailAddress, ErrorMessageResourceType = typeof(ModelLocalization),
            ErrorMessageResourceName = "ContactViewModel_Email_Your_email_address_contains_some_errors")]
        [Display(Name = "ContactViewModel_Email", ResourceType = typeof(ModelLocalization))]
        public string Email { get; set; }

        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        /// <value>
        /// The title.
        /// </value>
        [Required(ErrorMessageResourceType = typeof(ModelLocalization), ErrorMessageResourceName = "ContactViewModel_Title_You_need_to_fill_in_a_title")]
        [Display(Name = "ContactViewModel_Title", ResourceType = typeof(ModelLocalization))]
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the message.
        /// </summary>
        /// <value>
        /// The message.
        /// </value>
        [Required(ErrorMessageResourceType = typeof(ModelLocalization),
            ErrorMessageResourceName = "ContactViewModel_Comment_You_need_to_fill_in_a_comment")]
        [Display(Name = "ContactViewModel_Message", ResourceType = typeof(ModelLocalization))]
        [DataType(DataType.MultilineText)]
        public string Message { get; set; }

        /// <summary>
        /// Gets or sets the status.
        /// </summary>
        /// <value>
        /// The status.
        /// </value>
        public string Status { get; set; }
    }
}